package com.spring.demo5;

import org.springframework.beans.factory.annotation.Autowired;

public class TextEditor3 {
	
	private SpellChecker spellChecker;
	@Autowired
	public TextEditor3(SpellChecker spellChecker) {
		System.out.println("通过构造器实例化 TextEditor constructor." );
		this.spellChecker = spellChecker;
	}
	public SpellChecker getSpellChecker() {
		return spellChecker;
	}
	public void spellCheck() {
		spellChecker.checkSpelling();
	}
}
